function der_price = rcnl_der_price(rho, share, scond, pcoef)

ir = 1 / (1 - rho);
rr = rho / (1 - rho);

[J, ns]    = size(share);
pshare     = pcoef .* share;
own        = sum((ir - share - scond * rr) .* pshare, 2);
cross      = - (share + scond .* rr) * pshare';
cross(logical(eye(J))) = own;
der_price  = cross / ns;
